/*

This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.

If your plugin does not need CSS, delete this file.

*/

.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.button-container .mod-cta {
  flex: 1; /* Make buttons take equal width */
  margin: 25px; /* Adds some space between buttons */
}

.warning-message {
  background-color: black;
  color: orange;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  border: 1px solid orange;
  font-weight: bolder;
  text-align: center;
}

.copilot-setting-item-name {
  font-weight: bold;
  display: block;
  color: var(--inline-title-color);
  margin-top: 20px;
  margin-bottom: 10px;
}

.copilot-setting-item-description {
  display: block;
  margin-top: 10px;
  margin-bottom: 10px;
}

.copilot-setting-item-control {
  width: 50%; /* Adjust the width as needed */
  max-width: 100%; /* Ensures it doesn't exceed the parent width */
}

.copilot-setting-item-control::placeholder {
  color: gray; /* Set the color you want for the placeholder text */
  opacity: 0.5; /* Adjust for lighter appearance */
}

.copilot-setting-item-control[type="range"] {
  width: 70%;
}

.chat-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;  /* Fix overflow and can't scroll up */
}

.bottom-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  width: 100%;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.chat-icons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 8px 8px 0;
  order: 1;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-scaler {
  transform: scale(1.6);
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 5px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 50%;
  margin-bottom: 4px;
  transform: translateX(-50%);
  transition: opacity 0.3s;
}

.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper:hover .tooltip-text,
.chat-icon-button:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.chat-icon-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}

.chat-icon-selection {
  color: var(--inline-title-color);
}

.chat-input-container {
  display: flex;
  padding: 8px;
  box-sizing: border-box;
  flex-grow: 1;
  width: 100%;
  order: 2;
}

.chat-input-container textarea {
  width: 100%;
  margin-right: 8px;
  margin-bottom: 8px;
  resize: none;
  overflow: auto;
  min-height: 60px;
  max-height: 200px;
  box-sizing: border-box;
}

.chat-input-container textarea::placeholder {
  color: var(--inline-title-color);
  opacity: 0.5;
}

.chat-input-container button {
  padding: 8px;
  margin: 8px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: calc(var(--font-text-size) - 2px);
  box-sizing: border-box;
  scroll-behavior: smooth;
  margin-top: auto;
  user-select: text;
}

.message-container {
  display: flex;
  width: 100%;
  margin: 0;
}

.message {
  display: flex;
  padding: 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  position: relative;
}

.message-icon {
  width: 24px;
  margin-right: 8px;
  color: var(--inline-title-color);
  grid-area: icon;
}

.message-content {
  white-space: pre-wrap;
  line-height: 1.5;
  grid-area: content;
  max-width: 95%;
  word-break: break-word;
}

.message-content pre, .message-content p {
  margin: 0;
  padding: 0;
}

.message-content ol, .message-content ul {
  list-style: none;
  padding-left: 20px;
  margin: 0;
}

.message-content li {
  margin: 0;
  width: 100%;
  padding-left: 10px;
  display: inline;
  position: relative;
}

.message-content li::before {
  content: counter(list-item, decimal) ".";
  counter-increment: list-item;
  position: absolute;
  left: -20px;
}

.message-content li:has(> p) {
    display: flex;
    flex-direction: column;
}

.message-content li:has(> p)::before {
    align-self: flex-start;
    margin-top: 0; /* Adjust this value to align the pseudo-element vertically */
}

.copy-message-button {
  width: 24px;
  height: 24px;
  padding: 4px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.user-message {
  width: 95%;
  color: var(--inline-title-color);
}

.bot-message {
  width: 95%;
}

.copilot-command-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.copilot-command-input-container {
  width: 90%;
  margin: auto;
}

.copilot-command-input-container input,
.copilot-command-input-container textarea {
  display: block;
  width: 100%;
  margin-top: 10px;
}

.copilot-command-input-container textarea {
  height: 150px;
  resize: vertical;
}

.copilot-command-save-btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.copilot-command-save-btn {
  margin-top: 15px;
}
